<template>
<div class="home"><div class="xx">
    
    <h3>搜索历史</h3>
    <Ppc :kk="ppc" @mine="show"></Ppc></div>
    <div class="ll">
          <van-nav-bar
  
  left-text="返回"
  left-arrow
  @click-left="onClickLeft"
/>
   
        <input v-model="name"  >
   <button @click="add()">搜索</button>
 
  
    </div> <div class="ww">
     <h3>最新搜索</h3>
        <p>{{result}}</p>
        </div></div>
    

   
</template>

<script>
import Ppc from "../components/Ppc.vue"
    export default {
         setup() {
    const onClickLeft = () => history.back();
    return {
      onClickLeft,
    };
  },
         components:{
           Ppc
        },
         data() {
                return {
                ppc:[],
                name:"",
                result:""

                }
            },
            methods: {
                add(){
                if(this.name !="")
                {this.ppc.push(this.name);
                this.name=""}
                 
             },
             show(a){
                 this.result=a;
             }
    
            },
         
           
           
    }
</script>

<style lang="scss" scoped>
.home{
    width: 100%;
}
    .ww{
        width: 100%;
        position: fixed;
        bottom: 300px;
        left: 30px;
        
        p{
            position: fixed;
            left: 30px;
        }
        h3{
            width: 100%;
            text-align: left;
            
        }
    }
.xx{
    position: fixed;
    top: 70px;
    left: 30px;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    height: 50px;
    h3{
        width: 100%;
        text-align: left;
    }
}
     .ll{
         position: fixed;
         top: 0px;
         right: 10px;
         width: 100%;
        
         input{
             width: 60%;
            
             
         }
         button{
             width: 15%;
             margin-left: 10px;
             border-radius: 20%;
         }
     }
</style>